package org.dromara.cms.domain.bo;

import org.dromara.cms.domain.CmsTag;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

/**
 * CMS标签业务对象 cms_tag
 *
 * @author Spring
 * @date 2024-12-24
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = CmsTag.class, reverseConvertGenerate = false)
public class CmsTagBo extends BaseEntity {

    /**
     * 标签ID
     */
    @NotNull(message = "标签ID不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 标签名称
     */
    @NotBlank(message = "标签名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String name;

    /**
     * URL别名
     */
    @NotBlank(message = "URL别名不能为空", groups = { AddGroup.class, EditGroup.class })
    private String slug;

    /**
     * 图标
     */
    @NotBlank(message = "图标不能为空", groups = { AddGroup.class, EditGroup.class })
    private String icon;

    /**
     * 颜色
     */
    @NotBlank(message = "颜色不能为空", groups = { AddGroup.class, EditGroup.class })
    private String color;

    /**
     * 文章数量
     */
//    @NotNull(message = "文章数量不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long count;

    /**
     * 状态（0正常 1停用）
     */
    @NotBlank(message = "状态（0正常 1停用）不能为空", groups = { AddGroup.class, EditGroup.class })
    private String status;

    /**
     * 备注
     */
    @NotBlank(message = "备注不能为空", groups = { AddGroup.class, EditGroup.class })
    private String remark;


}
